package com.spider.demo4genericity;

public class GenericDemo4 {
    public static void main(String[] args) {
        //学会定义泛型方法，搞清楚作用。
        //需求：打印任意数组的内容
        String [] names = {"张三","李四","王五","赵六","小六"};
        printArray(names);
    }
    public static <T> void printArray(T[] array){
        for (T t : array) {
            System.out.println(t);
        }
    }
}